package com.zero.factory;

import com.zero.core.ZeroContext;
import com.zero.execute.reader.XMLReader;
import com.zero.execute.writer.DaoWriter;
import com.zero.execute.writer.EntityWriter;
import com.zero.execute.writer.ServiceWriter;

/**
 * 入口工厂
 *
 * @author wuxi
 * @date 2020-07-28
 */
public class ZeroApplication {

    public static void run(){
        System.out.println("------开始构建----");
        //读取配置,构建容器
        ZeroContext context = new XMLReader().read();
        //生成entity
        new EntityWriter(context).create();
        //生成Dao
        new DaoWriter(context).create();
        //生成service
        new ServiceWriter(context).create();
        System.out.println("------结束-----");
    }
}